﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using ZSZ.Core.Entities;

namespace ZSZ.EntityFramework.ModelConfig
{
    class CityConfig : EntityTypeConfiguration<CityEntity>
    {
        public override void Map(EntityTypeBuilder<CityEntity> builder)
        {
            builder.ToTable("T_City");
            builder.Property(e => e.Name).IsRequired().HasMaxLength(20);
        }
    }
}
